
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>1.1 第一节 · 这是我的第一本gitbook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="景智君">
        <meta name="identifier" content="图书编号" scheme="ISBN">
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="writing.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        <li class="header">第一章</li>
        
        
    
        <li class="chapter active" data-level="1.1" data-path="ch1.html">
            
                <a href="ch1.html">
            
                    
                    1.1 第一节
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="writing.html">
            
                <a href="writing.html">
            
                    
                    1.2 第二节
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="./">
            
                <a href="./">
            
                    
                    1.3 第三节
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第二章</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../chapter-2/ch2.html">
            
                <a href="../chapter-2/ch2.html">
            
                    
                    2.1 第一节
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../chapter-2/">
            
                <a href="../chapter-2/">
            
                    
                    2.2 第二节
            
                </a>
            

            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../">
            
                <a href="../">
            
                    
                    README
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >1.1 第一节</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <blockquote>
<p>&#x6982;&#x8981;&#x6587;&#x4EF6;&#x4E3B;&#x8981;&#x5B58;&#x653E; GitBook &#x7684;&#x6587;&#x4EF6;&#x76EE;&#x5F55;&#x4FE1;&#x606F;&#xFF0C;&#x5DE6;&#x4FA7;&#x7684;&#x76EE;&#x5F55;&#x5C31;&#x662F;&#x6839;&#x636E;&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x6765;&#x751F;&#x6210;&#x7684;&#xFF0C;
&#x9ED8;&#x8BA4;&gt; &#x5BF9;&#x5E94;&#x7684;&#x6587;&#x4EF6;&#x662F; SUMMARY.md&#xFF0C;&#x53EF;&#x4EE5;&#x5728; book.json &#x91CD;&#x65B0;&#x5B9A;&#x4E49;&#x8BE5;&#x6587;&#x4EF6;&#x7684;&#x5BF9;&#x5E94;&#x503C;&#x3002;
&#x5B83;&#x901A;&#x8FC7;  Markdown &#x4E2D;&#x7684;&#x5217;&#x8868;&#x8BED;&#x6CD5;&#x6765;&#x8868;&#x793A;&#x6587;&#x4EF6;&#x7684;&#x7236;&#x5B50;&#x5173;&#x7CFB;&#xFF0C;&#x4E0B;&#x9762;&#x662F;&#x4E00;&#x4E2A;&#x7B80;&#x5355;&#x7684;&#x793A;&#x4F8B;&#xFF1A;</p>
</blockquote>
<h1 id="&#x4E00;&#x3001;&#x57FA;&#x7840;">&#x4E00;&#x3001;&#x57FA;&#x7840;</h1>
<h2 id="1-&#x56FE;&#x7247;">1. &#x56FE;&#x7247;</h2>
<p>&#x5F15;&#x8A00;&#xFF1A;&#x56FE;&#x7247;&#x5927;&#x5C0F;&#x4E00;&#x822C;&#x90FD;&#x662F;&#x51E0;&#x5146;&#xFF0C;&#x8D85;&#x51FA;&#x7A0B;&#x5E8F;&#x6D41;&#x91CF;&#x5927;&#x5C0F;&#xFF0C;&#x4E00;&#x822C;&#x76F4;&#x63A5;&#x4F7F;&#x7528;&#x5916;&#x7F51;&#x56FE;&#x7247;&#xFF1B;</p>
<h2 id="2-&#x8F6E;&#x64AD;&#x56FE;&#xFF08;swiper&#x7EC4;&#x4EF6;&#xFF09;">2. &#x8F6E;&#x64AD;&#x56FE;&#xFF08;swiper&#x7EC4;&#x4EF6;&#xFF09;</h2>
<h2 id="3-&#x81EA;&#x5B9A;&#x4E49;&#x7EC4;&#x4EF6;">3. &#x81EA;&#x5B9A;&#x4E49;&#x7EC4;&#x4EF6;</h2>
<ol>
<li><p>&#x7236;&#x7EC4;&#x4EF6;&#xFF08;&#x9875;&#x9762;&#xFF09;&#x5411;&#x5B50;&#x7EC4;&#x4EF6;&#x4F20;&#x9012;&#x6570;&#x636E;&#xFF0C;&#x901A;&#x8FC7;&#x53D8;&#x8FC1;&#x5C5E;&#x6027;&#x7684;&#x65B9;&#x5F0F;&#x6765;&#x4F20;&#x9012;</p>
<p>&#x200B;        1. &#x5728;&#x5B50;&#x7EC4;&#x4EF6;&#x4E0A;&#x8FDB;&#x884C;&#x6570;&#x636E;&#x7684;&#x63A5;&#x6536;</p>
<pre><code class="lang-javascript">properties: {
     aaa: {
     <span class="hljs-comment">//&#x8981;&#x63A5;&#x6536;&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;</span>
     type:<span class="hljs-built_in">String</span>,
     <span class="hljs-comment">//&#x9ED8;&#x8BA4;&#x503C;</span>
      value:<span class="hljs-string">&quot;&quot;</span>
   }
}
</code></pre>
<ol>
<li>&#x628A;&#x8FD9;&#x4E2A;&#x6570;&#x636E;&#x5F53;&#x6210;data&#x4E2D;&#x7684;&#x6570;&#x636E;&#x76F4;&#x63A5;&#x4F7F;&#x7528;&#xFF08;Tabs.wxml&#x4E2D;&#x5B9A;&#x4E49;</li>
<li>&#x5B50;&#x5411;&#x7236;&#x4F20;&#x9012;&#x6570;&#x636E;&#xFF0C;&#x901A;&#x8FC7;&#x4E8B;&#x4EF6;&#x7684;&#x65B9;&#x5F0F;&#x4F20;&#x9012;</li>
</ol>
</li>
</ol>
<p><img src="https://gitee.com/MagicalJZJ/blog-img/raw/master/img/20210610112951.png" alt="image-20210610112951199"></p>
<h2 id="&#x4E00;&#x3001;&#x9996;&#x9875;">&#x4E00;&#x3001;&#x9996;&#x9875;</h2>
<h3 id="1-&#x81EA;&#x5B9A;&#x4E49;&#x7EC4;&#x4EF6;">1. &#x81EA;&#x5B9A;&#x4E49;&#x7EC4;&#x4EF6;</h3>
<ol>
<li>&#x5728;component&#x6587;&#x4EF6;&#x5939;&#x4E0B;&#x9762;&#xFF0C;&#x53F3;&#x952E;&#x65B0;&#x5EFA;&#x7EC4;&#x4EF6;&#xFF1B;</li>
<li>&#x5728;index&#x6587;&#x4EF6;&#x5939;&#x4E0B;&#x7684;index.json&#x7684;usingComponent&#x4E2D;&#x589E;&#x52A0;&#x8BE5;&#x7EC4;&#x4EF6;&#xFF1B;</li>
<li>&#x5728;pages/index.</li>
</ol>
<p><img src="https://gitee.com/magicaljzj/blog-img/raw/master/img/image-20210613164135498.png" alt="image-20210613164135498" style="zoom: 50%;"></p>
<h2 id="&#x4E8C;&#x3001;&#x5206;&#x7C7B;">&#x4E8C;&#x3001;&#x5206;&#x7C7B;</h2>
<h3 id="1-&#x6570;&#x636E;&#x548C;&#x9875;&#x9762;&#x76F8;&#x5BF9;&#x5E94;">1. &#x6570;&#x636E;&#x548C;&#x9875;&#x9762;&#x76F8;&#x5BF9;&#x5E94;</h3>
<h2 id="&#x4E09;&#x3001;-&#x5546;&#x54C1;&#x5217;&#x8868;&#x9875;&#x9762;">&#x4E09;&#x3001; &#x5546;&#x54C1;&#x5217;&#x8868;&#x9875;&#x9762;</h2>
<h3 id="31-&#x4E0B;&#x62C9;&#x5237;&#x65B0;&#x52A0;&#x8F7D;&#x4E0B;&#x4E00;&#x9875;&#x6570;&#x636E;">3.1 &#x4E0B;&#x62C9;&#x5237;&#x65B0;&#x52A0;&#x8F7D;&#x4E0B;&#x4E00;&#x9875;&#x6570;&#x636E;</h3>
<p>&#x5728;js&#x6587;&#x4EF6;&#x548C;onload&#x540C;&#x7EA7;&#x52A0;&#x5165;&#x9875;&#x9762; <strong>&#x9875;&#x9762;&#x4E0A;&#x62C9;&#x89E6;&#x5E95;&#x4E8B;&#x4EF6;&#x7684;&#x5904;&#x7406;&#x51FD;&#x6570;</strong> <code>onReachBottom</code></p>
<h3 id="32-&#x5168;&#x5C40;&#x6B63;&#x5728;&#x52A0;&#x8F7D;&#x56FE;&#x6807;">3.2 &#x5168;&#x5C40;&#x6B63;&#x5728;&#x52A0;&#x8F7D;&#x56FE;&#x6807;</h3>
<p>&#x5C06;&#x8FD9;&#x4E00;&#x5757;&#x5C01;&#x88C5;&#x5728;<code>request</code>&#x4E2D;</p>
<pre><code class="lang-javascript">wx.showLoading({
  title: <span class="hljs-string">&apos;&#x52A0;&#x8F7D;&#x4E2D;&apos;</span>,
})

setTimeout(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
  wx.hideLoading()
}, <span class="hljs-number">2000</span>)
</code></pre>
<p>&#x5728;<code>request</code>&#x51FD;&#x6570;&#x4E2D;&#x52A0;&#x5165;ajaxTimes&#x7528;&#x6765;&#x8BB0;&#x5F55;&#x8BF7;&#x6C42;&#x6570;&#xFF0C;&#x5F53;&#x6240;&#x6709;&#x8BF7;&#x6C42;&#x5B8C;&#x6210;&#x65F6;&#x624D;&#x5173;&#x95ED;&#x52A0;&#x8F7D;&#x56FE;&#x6807;</p>
<h3 id="33-&#x70B9;&#x51FB;&#x9884;&#x89C8;&#x56FE;&#x7247;&#x5927;&#x56FE;">3.3 &#x70B9;&#x51FB;&#x9884;&#x89C8;&#x56FE;&#x7247;&#x5927;&#x56FE;</h3>
<p><img src="https://gitee.com/magicaljzj/blog-img/raw/master/img/image-20210706153752933.png" alt="image-20210706153752933" style="zoom: 80%;"></p>
<p>&#x9700;&#x8981;&#x81EA;&#x5B9A;&#x4E49;&#x5C5E;&#x6027;&#x5C5E;&#x6027;&#x53BB;&#x83B7;&#x53D6;&#x76F8;&#x5E94;&#x7684;&#x503C;</p>
<p><strong>data-&#x5C5E;&#x6027;&#x540D;</strong>&#xFF1A;&#x81EA;&#x5B9A;&#x4E49;&#x5C5E;&#x6027;&#x83B7;&#x53D6;&#x5BF9;&#x5E94;&#x7684;&#x503C;</p>
<pre><code class="lang-javascript"><span class="hljs-comment">//&#x5FAE;&#x4FE1;API</span>
wx.previewImage({
  current: <span class="hljs-string">&apos;&apos;</span>, <span class="hljs-comment">// &#x5F53;&#x524D;&#x663E;&#x793A;&#x56FE;&#x7247;&#x7684;http&#x94FE;&#x63A5;</span>
  urls: [] <span class="hljs-comment">// &#x9700;&#x8981;&#x9884;&#x89C8;&#x7684;&#x56FE;&#x7247;http&#x94FE;&#x63A5;&#x5217;&#x8868;</span>
})
</code></pre>
<ol>
<li><strong>index.wxml</strong></li>
</ol>
<p><img src="https://gitee.com/magicaljzj/blog-img/raw/master/img/image-20210706154257207.png" alt="image-20210706154257207"></p>
<ol>
<li><p><strong>index.js</strong></p>
</li>
<li><p>&#x5B9A;&#x4E49;&#x5168;&#x5C40;&#x53D8;&#x91CF; GoodsInfo</p>
</li>
<li><p>&#x8F6E;&#x64AD;&#x56FE;&#x51FD;&#x6570;</p>
<p><img src="https://gitee.com/magicaljzj/blog-img/raw/master/img/image-20210706155802812.png" alt="image-20210706155802812" style="zoom:80%;"></p>
<p><img src="https://gitee.com/magicaljzj/blog-img/raw/master/img/cart.jpg" alt="cart"></p>
</li>
</ol>
<h2 id="&#x56DB;&#x3001;&#x652F;&#x4ED8;&#x9875;&#x9762;">&#x56DB;&#x3001;&#x652F;&#x4ED8;&#x9875;&#x9762;</h2>
<p><img src="https://gitee.com/magicaljzj/blog-img/raw/master/img/image-20210710103820332.png" alt="image-20210710103820332"></p>
<p><img src="https://gitee.com/magicaljzj/blog-img/raw/master/img/image-20210710104310556.png" alt="image-20210710104310556"></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="writing.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 1.2 第二节">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"1.1 第一节","level":"1.1","depth":1,"next":{"title":"1.2 第二节","level":"1.2","depth":1,"path":"chapter-1/writing.md","ref":"chapter-1/writing.md","articles":[]},"dir":"ltr"},"config":{"plugins":["search-pro","code","expandable-chapters","back-to-top-button"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"search-pro":{},"search":{"maxIndexSize":1000000},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"back-to-top-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"theme":"default","author":"景智君","lang":"zh-cn","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"isbn":"图书编号","variables":{},"title":"这是我的第一本gitbook","gitbook":"*","description":"描述"},"file":{"path":"chapter-1/ch1.md","mtime":"2021-08-04T03:28:54.818Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-08-04T03:36:50.209Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/buttons.js"></script>
        
    

    </body>
</html>

